package com.xl.entity;

import com.xl.annotation.PrefixName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@PrefixName("用户")
public class User implements Serializable {

    /**
     * 姓名
     */
    @PrefixName("姓名")
    private String name;
    /**
     * 密码
     */
    private String password;
    /**
     * 年龄
     */
    @PrefixName("年龄")
    private Integer age;
    /**
     * 角色
     */
    @PrefixName("角色")
    private Integer participant;
    /**
     * 工资
     *
     * @param meal
     */
    private Integer salary;

    private void eat(String meal) {
        System.out.println("用户想要吃：" + meal);
    }

    private void eat() {
        System.out.println("我啥也不想吃");
    }

    private void drink(String water) {
        System.out.println("用户想喝" + water);
    }

    public static List<User> getUsers() {

        List<User> users = new ArrayList<>();

        User user1 = new User();
        user1.setName("one");
        user1.setPassword("1111111");
        user1.setAge(2);
        user1.setSalary(9000);
        user1.setParticipant(1);

        User user2 = new User();
        user2.setName("two");
        user2.setPassword("222222");
        user2.setAge(2);
        user2.setSalary(9000);
        user2.setParticipant(2);



        User user3 = new User();
        user3.setName("three");
        user3.setPassword("333333");
        user3.setAge(2);
        user3.setSalary(9000);
        user3.setParticipant(3);

        User user4 = new User();
        user4.setName("four");
        user4.setPassword("444444");
        user4.setAge(2);
        user4.setSalary(9000);
        user4.setParticipant(4);

        users.add(user1);
        users.add(user2);
        users.add(user3);
        users.add(user4);

        return users;
    }

}
